/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utils;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author fuanka
 */
public class ImageLoader {

    private boolean debug=true;

    public BufferedImage loadImageFromURL(String url){
        BufferedImage img = null;
        try {
            img = ImageIO.read(new File(url));
        } catch (IOException ioe) {
            System.out.println("ERROR: Unable to Load Image "+url);
            if(debug)
                ioe.printStackTrace();
        }
        return img;
    }
}
